import 'package:bloc/bloc.dart';
import 'state.dart';

class BlocDemoCubit extends Cubit<BlocDemoState> {
  BlocDemoCubit() : super(BlocDemoState().init());

  void increment() {
    emit(state.clone(counter: state.counter + 1));
  }

  void decrement() {
    emit(state.clone(counter: state.counter - 1));
  }
}
